Say why source mode wants an exports list - #4
Closed
pathscale wants to merge 1 commit into
Closed
Conversation
The message was "must declare its public Layout exports", which reads as a missing required field. It sends you to write the list, when the question worth asking is whether you wanted source mode at all: convention-based discovery needs no such list, and the documentation says so in as many words. It also said nothing about the cost of keeping one. Nothing compares the list to the barrel, so a rename that misses it leaves the manifest naming components that no longer exist while rejecting the ones that do, with no diagnostic anywhere. That is worth knowing before you choose the mode, not after. The message now names the trade and points at both ways out.
Owner
Author
|
#5 is stacked on this branch. Merging this one first keeps that diff clean. |
Owner
Author
|
Folded into #5, which contains this commit plus the Solid 2 work. One PR instead of two. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One error message. No behaviour change.
emitSourceManifestthrewmust declare its public Layout exports, which reads as a missing required field and sends you off to write the list. The question worth asking first is whether you wantedmode: "source"at all, because convention-based discovery needs no such list anddocs/getting-started.mdsays exactly that: "No authored component manifest is required."It also said nothing about what keeping the list costs. Nothing compares it to the barrel, so a rename that misses it leaves the manifest naming components that no longer exist while rejecting the ones that do, silently and with no diagnostic anywhere.
That is how this was found. A library on source mode renamed eleven components across its source, its recipes and its barrel, rebuilt from a wiped
dist, and the manifest still saidCallout. Everything typechecked, the build was green, and the application compiler would have rejected<Alert>while accepting a name that no longer existed. The same list had also never heard of two components added that morning.The new message names the trade and points at both exits:
Suites unchanged and passing: library 7, application 14.